package com.ruoyi.query.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ruoyi.common.annotation.DynamicAnnotation;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

import java.io.Serializable;
import java.util.List;

/**
 * <p>
 * 动态查询
 * </p>
 *
 * @author XiaShiLong
 * @since 2021-03-25
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
@TableName("dl_query")
@ApiModel(value = "动态查询", description = "动态查询")
public class Query implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @DynamicAnnotation("主键")
    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 自定义名称
     */
    @DynamicAnnotation("自定义名称")
    @ApiModelProperty(value = "自定义名称")
    private String name;

    /**
     * 用户id
     */
    @DynamicAnnotation("用户id")
    @ApiModelProperty(value = "用户id")
    private Long userId;

    /**
     * 查询对象全路径
     */
    @DynamicAnnotation("查询对象全路径")
    @ApiModelProperty(value = "查询对象全路径")
    private String classPath;

    /**
     * 菜单id
     */
    @DynamicAnnotation("菜单id")
    @ApiModelProperty(value = "菜单id")
    private Long menuId;

    /**
     * 类型(0系统,1用户)
     */
    @DynamicAnnotation("类型(0系统,1用户)")
    @ApiModelProperty(value = "类型(0系统,1用户)")
    private Integer type;

    /**
     * 查询明细
     */
    @TableField(exist = false)
    private List<QueryDtl> detailList;
}
